package main.java.exception;

import java.awt.*;
import java.io.IOException;

public class ThrowsDemo {
    public void doSome() throws IOException, AWTException {

    }
}
class SubClass extends ThrowsDemo{
    //允许子类仅抛出超类的部分异常
    //public void doSome() throws IOException {}

    //允许子类不抛出异常
    //public void doSome(){}

    //不允许子类抛出超类没有的异常
    //public void doSome() throws NullPointerException{}

    //允许子类抛出超类异常的子类异常
    //public void doSome() throws FileNotFoundException {}

    //不允许子类抛出额外异常
    //public void doSome() throws SQLException {}

    //不允许子类抛出超类的父类异常
    //public void doSome() throws Exception {}
}
